<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[#include "/admin/include/head.htm"]
    <script type="text/javascript">
        var grid;
        $(function () {
            grid = $("#maingrid").ligerGrid({
                columns: [
                    {display: 'ID', name: 'id', width: 50, align: 'center', isAllowHide: false},
                    {display: '积分', name: 'intergral', align: 'center', width: 150},
                    {display: '金额', name: 'money', align: 'center', width: 150},


                    {display: '卡号', name: 'account', align: 'center', width: 150},
                    {display: '密码', name: 'password', align: 'center', width: 150},
                    {
                        display: '已使用', name: 'isUsed', align: 'center', width: 100,
                        render: function (row) {
                            return row.isUsed == "true" ? '是' : '否';
                        }
                    },
                    {
                        display: '已激活', name: 'isActivate', align: 'center', width: 100,
                        render: function (row) {
                            return row.isActivate == "true" ? '是' : '否';
                        }
                    },
                    {display: '使用用户', name: 'memberDomain.username', align: 'center', width: 120},
                    {display: '使用时间', name: 'overtime', align: 'center', width: 120},
                ], pageSize: 20, url: 'queryData.jhtml', toolbar: {}, width: '100%', height: '100%', enabledSort: true
            });

            $("#pageloading").hide();
            LG.loadToolbar(grid);

            //绑定搜索按钮
            LG.search(grid);


        });
        function add() {
            top.f_addTab(null, '新增商品', 'b2c/b2c_card_list/add.jhtml?parentMenuNo=goods_list');
        }

        function jh() {
            var selecteds = grid.getSelecteds();
            if (selecteds.length > 0) {
                jQuery.ligerDialog.confirm('确定删除吗?', function (confirm) {
                    if (confirm) {
                        LG.ajax({
                            url: base + '/admin/b2c/b2c_card_list/jh.jhtml',
                            loading: '正在删除中...',
                            data: {ids: LG.getIds(selecteds)},
                            success: function () {
                                LG.showSuccess('激活成功');
                                f_reload();
                            },
                            error: function (message) {
                                LG.showError(message);
                            }
                        });
                    }
                });
            } else {
                LG.tip('请选择行!');
            }
        }

    </script>
</head>
<body style="padding:10px; overflow:hidden;">
<div id="functions">

		<span>
			回复状态:[@u.select headerKey="" headerValue="全部"
        headerButtom="false" list={"true":"已使用","false":"未使用"}
        name="search_EQ_isUsed"/]
		</span>
    <input type="button" id="search" class="button" value="搜索"/>
    <a href="#" id="search_btn_reset" face="Wingdings 3">解除搜索,显示全部数据</a>
</div>
<div id="maingrid" style="margin:0; padding:0"></div>
</body>
</html>